/**
 * Copyright © 2009 Qasky. All rights reserved.
 *
 * 数据字典请求接口
 *
 * @author Wang Hongya
 * @version 0.0.0 2019/10/14
 *
 * History:
 * (author, date, desc)
 * (Wang Hongya, 20191014, 创建文件)
 */
import request from '../libs/request';


/**
 * 分页查询系统数据字典列表
 * @param query
 * @returns {*}
 */
export function findSysDicts (para) {
    return request({
        url: 'api/sysdict/findSysDicts',
        method: 'get',
        params: para
    });
}
/**
 * 添加系统数据字典信息
 * @param query
 * @returns {*}
 */
export function addSysDict (para) {
    return request({
        url: 'api/sysdict/addSysDict',
        method: 'post',
        data: para
    });
}
/**
 * 编辑系统数据字典信息
 * @param query
 * @returns {*}
 */
export function updSysDict (para) {
    return request({
        url: 'api/sysdict/updSysDict',
        method: 'post',
        data: para
    });
}

/**
 * 批量删除系统数据字典信息
 * @param query
 * @returns {*}
 */
export function batchDelSysDicts (para) {
    return request({
        url: 'api/sysdict/delSysDicts',
        method: 'post',
        data: para
    });
}

/**
 * 加载字典类型
 * @param query
 * @returns {*}
 */
export function loadSorts () {
  return request({
    url: 'api/sysdict/loadSysDictSort',
    method: 'get',
      isCommon:'sysconf'
  });
}

/**
 * 通过类型加载数据字典
 * @param query
 * @returns {*}
 */
export  function loadSysDictsBySort (para) {
    let parms =para
    parms.serverCode = 'auth'
  return request({
    url: 'api/sysdict/loadSysDictsBySort',
    method: 'get',
    params: parms,
      isCommon:'sysconf'
  });
}

